<extend name="Public:base" />
<block name="main">
	<div class="content" id="js-date">
		<section class="location">
			<i class="iconfont">&#xe60f</i> 位置：<a href="{:U('Index/main')}">管理首页</a> &gt; <a href="{:U('index')}">广告管理</a> &gt; 发布广告
		</section>
		<ul class="nav-tabs clearfix">
			<li><a href="{:U('index')}">广告管理</a></li>
			<li class="active">发布广告</li>
		</ul>
		<form method="post" action="" id="form">
			<input type="hidden" name="class" id="class" value="{$Think.CONTROLLER_NAME}" />
			<input type="hidden" name="cid" id="cid" value="{$Think.const.NOW_TIME}" />
			<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table">
			<tr>
				<th width="100">广告位置</th>
				<td>
					<select name="category_id" class="form-control">
						<option value="0">首页</option>
						<foreach name="category" item="list">
						<option value="{$list.id}">{$list.delimiter}<if condition="$list.parent_id neq 0">├─</if>{$list.name}</option>
						</foreach>
					</select>
				</td>
			</tr>
			<tr>
				<th>标题</th>
				<td><input type="text" name="title" id="title" class="form-control form-control-lg" required /> <span class="red"> *</span> </td>
			</tr>
			<tr>
				<th>图片相册</th>
				<td>
    				<div class="img_box clearfix" id="img_box"></div>
					<input type="file" name="btn_upload_gallery" id="btn_upload_gallery" multiple />
				</td>
			</tr>
			<tr>
				<th>发布时间</th>
				<td><input type="text" name="start_time" id="start_time" class="form-control form-control-time js-date" value="{$Think.const.NOW_TIME|date='Y-m-d H:i:s',###}" /></td>
			</tr>
			<tr>
				<th>结束时间</th>
				<td><input type="text" name="end_time" id="end_time" class="form-control form-control-time js-date" /></td>
			</tr>
			<tr>
				<th>链接</th>
				<td><textarea name="url" id="url" class="form-control form-control-lg"></textarea><span id="tip">请依图片填写链接，以小写“,”区分</span></td>
			</tr>
			<tr>
				<th>说明</th>
				<td><textarea name="description" id="description" class="form-control form-control-lg"></textarea> </td>
			</tr>
			</table>
			<div class="well"><button type="submit" class="btn btn-theme" id="submit_add">发 布</button> <button class="btn btn-gary" onclick="javascript:history.back(-1);">返 回</button></div>
		</form>
	</div>
</block>
